#include <iostream>
using namespace std;
void readNumbers(char **c)
{
	while(**c != '\0' && **c >= '0' && **c <= '9')
		++(*c);
}
bool exponentialDigits(char **c)
{
	if(**c == 'e' || **c == 'E')
		++(*c);
	if(**c == '+' || **c == '-')
		++(*c);
	if(**c == '\0')
		return false;
	readNumbers(c);
	cout<<**c<<endl;
	if(**c != '\0')
		return false;
	return true;

}
bool numericStrings(char arr[])
{
	if(arr == nullptr)
		return false;
	if(*arr == '+' || *arr == '-')
		++arr;
	if(*arr == '\0')
		return false;

	bool numeric = true;
	readNumbers(&arr);
	if(*arr != '\0')
	{
		//float
		if(*arr == '.')
		{
			++arr;
			readNumbers(&arr);
			if(*arr == 'e'|| *arr == 'E')
				numeric = exponentialDigits(&arr);
			cout<<numeric<<endl;
		}
		else if(*arr == 'e' || *arr == 'E')
			numeric = exponentialDigits(&arr);
		else 
			numeric = false;
	}
	return numeric && *arr =='\0';
}

int main()
{
	char str[] = "123.45e+6";
	cout<<numericStrings(str)<<endl;
	return 0;
}